Skip to content

fix(search-events): Keep issue filters the agent rewrites - #2445

Open
sentry-junior[bot] wants to merge 2 commits into
mainfrom
fix/search-errors-preserve-issue-short-ids
Open

sentry-junior[bot] wants to merge 2 commits into
mainfrom
fix/search-errors-preserve-issue-short-ids

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

A structured errors query (for example issue:PROJ-2B3 with explicit fields) still goes through the embedded agent, because errors isn't a trace-item dataset and never qualifies for canRunWithoutAgent. The agent's query then runs as-is unless isSemanticFilterDowngrade fires, and that check doesn't compare filter values.

In two user reports the agent dropped the last character of a valid short ID (issue:PROJ-2B3 → issue:PROJ-2B), so Sentry rejected the search with Issue IDs do not exist. validateSearch passed because the validate endpoint doesn't check the errors dataset.

Issue IDs are exact identifiers, so when the agent changes or drops an explicit issue: / issue.id: filter from a structured query, this runs the caller's query instead, the same way a semantic filter downgrade already falls back.

This touches the same expression as #2139 (restores dropped timestamp: bounds), so whichever merges second needs a small rebase.

Fixes #2443

via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_6beea850935f9ba32a9ce5724de8c370.

--

View Session [Sentry]

A structured errors query still goes through the embedded agent, and its
query runs as-is unless it downgrades a filter. The agent has dropped the
last character of an issue short ID (issue:PROJ-2B3 -> issue:PROJ-2B), so
Sentry rejected the search with "Issue IDs do not exist". validateSearch
can't catch this because the validate endpoint skips the errors dataset.

Issue IDs are exact identifiers, so when the agent changes or drops an
explicit issue: or issue.id: filter, run the caller's structured query.

Fixes #2443
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Nov 20, 2026 12:32am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 20, 2026 12:32am UTC

Request Review

Match issue: and issue.id: filters after an opening parenthesis too, so
an agent rewrite inside (issue:A OR issue:B) also falls back to the
caller's query.
@vercel
vercel Bot temporarily deployed to Preview – sentry-local November 20, 2026 00:32 Inactive
@sentry-junior
sentry-junior Bot marked this pull request as ready for review November 20, 2026 00:47
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 20, 2026 00:47
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 20, 2026

This branch was successfully deployed

2 active and 1 inactive deployments
Preview – cli — 3985be2a Deployed Nov 20, 2026 by vercel[bot]
Actions — 3985be2a Deployed Nov 20, 2026 by sentry-junior[bot] via eval #1996
Preview – sentry-local — 3985be2a Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

search_errors agent rewrites issue short IDs in structured queries

0 participants